fix(k8s): repair failing unit tests and guard assume_role_lib jq exit#192
Open
fedemaleh wants to merge 3 commits into
Open
fix(k8s): repair failing unit tests and guard assume_role_lib jq exit#192fedemaleh wants to merge 3 commits into
fedemaleh wants to merge 3 commits into
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The BATS suite on
betahad 6 failing tests out of 973 (all ink8s). This restores the suite to 973 tests, 0 failures.Each failure was investigated individually rather than mechanically forcing tests green — important because one of them caught a real production bug.
Root causes & fixes
scope/tests/build_context.bats(2 tests)scope/build_contextnow emitsbase_domain(commitf5026d2); expected JSON was never updated. Added the field to both public/private expectations.deployment/tests/build_deployment.bats(2 tests)deployment.yaml.tplnow requirescpu_millicores_limit/ram_memory_limit(CPU/mem limits feature).deployment/build_contextnormalizes these in production, but the test fedbuild_deploymenta context skipping that step. Added the two_limitfields to_render_context.scope/tests/wait_on_balancer.bats(1 test)call_countnever persisted because the script readskubectlvia command substitution$(...), which runs the mock in a subshell. Switched to a file-based counter.utils/assume_role_lib(1 test)arn_for_selectordocuments "never crashes, returns empty on malformed input" but propagatedjq's exit code 5 on malformed JSON. The test was correct and caught it. Added `Test plan
./testing/run_bats_tests.sh→ 973 tests, 0 failures (was 6 failures)Notes
No CHANGELOG entry: 3 are test-only fixes and 1 is a defensive hardening with no real-world behavior change (only affects malformed input that shouldn't occur), per the repo's "skip changelog for internal test / no user-visible change" convention.